package com.quiz.bis.domain.bo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 组卷策略业务对象
 * @author ahuan
 */
@Data
public class PaperStrategyBO {
    private Long id;

    @NotBlank(message = "策略名称不能为空")
    private String name;

    private String description;

    /**
     * 策略类型 1-智能组卷 2-标准模板
     */
    @NotNull(message = "策略类型不能为空")
    private Integer strategyType;

    /**
     * 组卷配置
     * difficultyConfig  难度系数及其占比
     * knowledgeConfig   知识点ID列表
     * questionConfig   题型配置
     */
    private String difficultyConfig;
    private String knowledgeConfig;
    @NotNull(message = "题型配置不能为空")
    private String questionConfig;

    /**
     * 遗传策略配置
     * populationSize 种群大小
     * maxGenerations 最大迭代次数
     * mutationRate 变异概率
     * crossoverRate 交叉概率
     * fitnessThreshold 适应度阈值
     * timeLimit 时间限制
     */
    private Integer populationSize;
    private Integer maxGenerations;
    private BigDecimal mutationRate;
    private BigDecimal crossoverRate;
    private BigDecimal fitnessThreshold;
    private BigDecimal diversityThreshold;
    private Integer timeLimit;

    // 标准模板相关配置
    private Long templateId;

}